


PATH_TO_DIA_FILES := ./

SVG_FILES := $(patsubst %.dia,%.svg,$(addprefix svg/,$(wildcard *.dia)))

PDF_FILES := $(patsubst %.dia,%.pdf,$(addprefix pdf/,$(wildcard *.dia)))

all: create_dirs  $(PDF_FILES) $(SVG_FILES)

create_dirs:
	mkdir -p svg
	mkdir -p pdf
	
svg/%.svg: %.dia
	dia $< --export=$@
	
pdf/%.pdf: svg/%.svg
	inkscape $< --export-pdf=$@ 


clean:
	rm -fr svg
	rm -fr pdf

.PHONY: clean
.PHONY: create_dirs
.PHONY: all

